package org.gardenXml.di;

public class Book {
    private String name;
    private String author;
    private String others;
    Book() {
        System.out.println("book init unll");
    }
    Book(String name, String author){
        this.name = name;
        this.author =author;
    }
    //生成set方法


    public String getOthers() {
        return others;
    }

    public void setOthers(String others) {
        this.others = others;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", others='" + others + '\'' +
                '}';
    }

    public static void main(String[] args) {
        Book book = new Book();
        book.setAuthor("garden");
        book.setName("三角梅");
        Book book1 = new Book("三角梅", "garden");
        book1.setName("三角梅");
        book1.setAuthor("garden");
    }

}
